<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"  
	xmlns:ui="http://java.sun.com/jsf/facelets" 
      xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
      >
<head>

</head>
<body>
	<ui:composition template="/templates/template.xhtml">
	

	<ui:define name="contenu">
	<br/><br/><br/>
		<f:view>
			<h:messages style="color:red"/>
			<h:form> 
				<table>
				<tr>
				   <td>Nom:</td> <td><h:inputText value="#{controllerBeanJsf.customer.lastname}" required="true" /></td>
				</tr>
				<tr>
				   <td>Prenom:</td> <td><h:inputText value="#{controllerBeanJsf.customer.firstname}" /></td>
				</tr>
				<tr>
				   <td>Date de naissance:</td> <td><h:inputText value="#{controllerBeanJsf.customer.birthDay}" id="dateField" required="true">
						<f:convertDateTime pattern="dd-MM-yyyy" /></h:inputText></td>
				</tr>
				<tr>
					<td>Adresse:</td>
				</tr>
				<tr>
					<td>Voie:</td> <td><h:inputText value="#{controllerBeanJsf.address.street}" /></td>
				</tr>
				<tr>
					<td>Code Postale:</td><td><h:inputText value="#{controllerBeanJsf.address.zipCode}" /></td>
				</tr>
				<tr>
					<td>Ville:</td><td><h:inputText value="#{controllerBeanJsf.address.city}" /></td>
				</tr>
				<tr>
					<td>Pays:</td><td><h:inputText value="#{controllerBeanJsf.address.country}" /></td>
				</tr>
				<tr>
					<td>Email:</td> <td><h:inputText value="#{controllerBeanJsf.customer.mail}" /></td>
				</tr>
				<tr>
					<td>Numéro de téléphone:</td><td><h:inputText value="#{controllerBeanJsf.customer.phoneNumber}" /></td>
				</tr>
				<tr>
					<td><h:outputText value="Pseudo :" /></td>
					<td><h:inputText value="#{controllerBeanJsf.customer.login}"  required="true"/></td>
				</tr>
				<tr>
					<td><h:outputText value="Mot de passe :" /></td>
					<td><h:inputSecret value="#{controllerBeanJsf.customer.password}"  required="true"/></td>
				</tr>
				<tr>
					<td></td><td><h:commandButton value="Enregistrer" 
					style="background:purple; color:white;border: 2px solid grey;border-radius:5px; height:30px"
					action="#{controllerBeanJsf.doCreateCustomer}" /></td>
				</tr>
			</table>
		</h:form>
				
			
			
		</f:view>
	</ui:define>
	
</ui:composition>
</body>

</html>